/*
 * @Author: sjr
 * @Date: 2021-01-24 11:35:14
 * @LastEditTime: 2021-01-24 13:35:55
 * @LastEditors: sjr
 * @Description: 描述
 * @FilePath: \leetcode\1.两数之和.js
 */
/*
 * @lc app=leetcode.cn id=1 lang=javascript
 *
 * [1] 两数之和
 */

// @lc code=start
/**
 * @param {number[]} nums
 * @param {number} target
 * @return {number[]}
 */
var twoSum = function(nums, target) {
 for(let i =0 ; i<nums.length; i++) {
   for(let j = i+1; j< nums.length; j++) {
     if(nums[i] + nums[j] === target) {
       return [i, j]
     }
   }
 }
};
// @lc code=end

